package com.dragon.modules.yuegou.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.time.Duration;

/**
 * 钱包模块，悦卡赠送配置
 * 
 * @author liuwu
 *
 */
@ConfigurationProperties(prefix = "wallet.card-present")
public class CardPresentProperties {

	/**
	 * 提取码长度（太短可能重复）
	 */
	private int codeLength = 8;

	/**
	 * 提取码有效期（默认30天）
	 */
	private Duration effectiveTime = Duration.ofDays(30);

	/**
	 * 最大单次批量赠送悦卡数量
	 */
	private int maxBatchNum = 50;
	
	public int getCodeLength() {
		return codeLength;
	}

	public void setCodeLength(int codeLength) {
		this.codeLength = codeLength;
	}

	public Duration getEffectiveTime() {
		return effectiveTime;
	}

	public void setEffectiveTime(Duration effectiveTime) {
		this.effectiveTime = effectiveTime;
	}

	public int getMaxBatchNum() {
		return maxBatchNum;
	}

	public void setMaxBatchNum(int maxBatchNum) {
		this.maxBatchNum = maxBatchNum;
	}

}
